package com.aya.simple;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * HttpServletResponse 两种方式注入的线程安全演示
 */
@Controller
public class ResponseController {


    @ResponseBody
    @RequestMapping("session")
    public String hello(HttpSession httpSession) throws IOException {
        return httpSession.getId();
    }

}
